from divisors import divisors

def trianglenr():
    t = 0
    i = 1
    
    while True:
        t += i
        i += 1
        yield t

tgen = trianglenr()
limit = 500

while True:
    t = tgen.next()
    nrDivisors = len(divisors(t))
    if nrDivisors >= limit:
        print t, nrDivisors
        break
